import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'Home'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/home/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/home/map',
    name: 'Map',
    component: () => import('../views/home/map/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/search',
    name: 'Search',
    component: () => import('../views/home/search/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/brandlist',
    name: 'Brandlist',
    component: () => import('../views/home/brandlist/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/brandlist/brand',
    name: 'Brand',
    component: () => import('../views/home/brandlist/brand/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/hotnew',
    name: 'Hotnew',
    component: () => import('../views/home/hotnew/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/topic',
    name: 'Topic',
    component: () => import('../views/topic/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/topic/topicdetail',
    name: 'TopicDetail',
    component: () => import('../views/topic/topicDetail/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/category',
    name: 'Category',
    component: () => import('../views/category/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/category/categoryList',
    name: 'CategoryList',
    component: () => import('../views/category/categoryList/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/goods',
    name: 'Goods',
    component: () => import('../views/goods/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () => import('../views/cart/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('../views/mine/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/mine/collect',
    name: 'Collect',
    component: () => import('../views/mine/collect/index.vue'),
    meta:{
      isFootShow:false
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
